﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Data.Entity;
using Iacym.Entities;

namespace Iacym.Repository.Mapping
{
    public class TIPO_MONEDAMap :EntityTypeConfiguration<TIPO_MONEDA>
    {
        public TIPO_MONEDAMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);
            this.Property(p => p.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(t => t.Descripcion).IsRequired().HasMaxLength(20);
                        
            this.ToTable("TIPO_MONEDA");
        }
    }
}
